package acationtiktokcasemymongo

const (
	ActionHouseMatchCpTypeCp       = 0 //cp
	ActionHouseMatchCpTypeCancelCp = 1 //解散cp

	ActionHouseMatchCpDoTypeAuto  = 0 //0:系统自动;1:管理后台;
	ActionHouseMatchCpDoTypeAdmin = 1 //0:系统自动;1:管理后台;

	ActionHouseMatchUserRelation       = 1 //组成
	ActionHouseMatchCancelUserRelation = 2 //解散
)

type ActionHouseMatchLogCases struct {
}

var ActionHouseMatchLogCasesObject ActionHouseMatchLogCases

func (e ActionHouseMatchLogCases) LogType() []int {
	return []int{
		ActionHouseMatchCpTypeCp,
		ActionHouseMatchCpTypeCancelCp,
	}
}

func (e ActionHouseMatchLogCases) LogTypeMap() map[int]int {
	m := make(map[int]int)
	for _, s := range e.LogType() {
		m[s] = s
	}
	return m
}

func (e ActionHouseMatchLogCases) LogTypeString(tag int) string {
	switch tag {
	case ActionHouseMatchCpTypeCp:
		return "组成CP"
	case ActionHouseMatchCpTypeCancelCp:
		return "解散CP"
	default:
		return "未知"
	}
}

func (e ActionHouseMatchLogCases) DoType() []int {
	return []int{
		ActionHouseMatchCpDoTypeAuto,
		ActionHouseMatchCpDoTypeAdmin,
	}
}

func (e ActionHouseMatchMarryLogCases) DoTypeMap() map[int]int {
	m := make(map[int]int)
	for _, s := range e.DoType() {
		m[s] = s
	}
	return m
}

func (e ActionHouseMatchMarryLogCases) DoTypeString(tag int) string {
	switch tag {
	case ActionHouseMatchCpDoTypeAuto:
		return "自动"
	case ActionHouseMatchCpDoTypeAdmin:
		return "后台操作"
	default:
		return "未知"
	}
}

func (e ActionHouseMatchMarryLogCases) RelationType() []int {
	return []int{
		ActionHouseMatchUserRelation,
		ActionHouseMatchCancelUserRelation,
	}
}

func (e ActionHouseMatchMarryLogCases) TripTaskNameMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.RelationType() {
		m[s] = e.RelationTypeString(s)
	}
	return m
}

func (e ActionHouseMatchMarryLogCases) RelationTypeString(tag int) string {
	switch tag {
	case ActionHouseMatchUserRelation:
		return "组成"
	case ActionHouseMatchCancelUserRelation:
		return "解散"
	default:
		return "未知"
	}
}
